﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProfilerPDS {
    //eventId|idThread|nameThread|idFunction|nameFunction|idClass|idObject|stack|Time

    class EventInfo {

        string eventName;

        public string EventName {
            get { return eventName; }
            set { 
                eventName = value;

                if (eventName == "new_thread") {
                    eventType = EventType.New_Thread;
                }
                if (eventName == "destroy_thread") {
                    eventType = EventType.Destroy_Thread;
                }
                if (eventName == "enter_function") {
                    eventType = EventType.Enter_Function;
                }
                if (eventName == "leave_function") {
                    eventType = EventType.Leave_Function;
                }
                if (eventName == "exception_thrown") {
                    eventType = EventType.Exception_Thrown;
                }
                if (eventName == "exception_catcher_enter") {
                    eventType = EventType.Exception_Catcher_Enter;
                }
                if (eventName == "exception_catcher_leave") {
                    eventType = EventType.Exception_Catcher_Leave;
                }
                if (eventName == "shutdown") {
                    eventType = EventType.Shutdown;
                }
                if (eventName == "object_allocated")
                {
                    eventType = EventType.ObjectCreated;
                }
            }
        }

        EventType eventType;

        public EventType EventType {
            get { return eventType; }
           
        }




        string idThread;

        public string IdThread {
            get { return idThread; }
            set { idThread = value; }
        }
        string nameThread;

        public string NameThread {
            get { return nameThread; }
            set { nameThread = value; }
        }
        string idFunction;

        public string IdFunction {
            get { return idFunction; }
            set { idFunction = value; }
        }
        string nameFunction;

        public string NameFunction {
            get { return nameFunction; }
            set { nameFunction = value; }
        }
        string idClass;

        public string IdClass {
            get { return idClass; }
            set { idClass = value; }
        }
        string idObject;

        public string IdObject {
            get { return idObject; }
            set { idObject = value; }
        }
        int stackDepth;

        public int StackDepth {
            get { return stackDepth; }
            set { stackDepth = value; }
        }
        string exceptionName;

        public string ExceptionName {
            get { return exceptionName; }
            set { exceptionName = value; }
        }
        bool isStatic = false;

        public bool IsStatic {
            get { return isStatic; }
            set { isStatic = value; }
        }
        string timeStamp;

        public string TimeStamp {
            get { return timeStamp; }
            set { timeStamp = value; }
        }

    
    
    
    
    }
}
